package com.slz3.business.module.drawManagement.draFreeLottery.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.drawManagement.draFreeLottery.domain.DraFreeLottery;
import com.slz3.business.module.drawManagement.draFreeLottery.domain.DraFreeLotteryCondition;
import com.slz3.business.module.drawManagement.draIntegralLottery.domain.DraIntegralLotteryCondition;
import com.slz3.business.module.drawManagement.draIntegralLottery.steward.DraIntegralLotteryResExecutor;
import com.slz3.business.module.drawManagement.draIntegralLottery.steward.DraIntegralLotteryResSafeValid;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Component
public class DraFreeLotteryResAtomic {

    public Mono<ServerResponse> add_$DraFreeLotteryUpdateLock(ServerRequest req, DraFreeLottery draFreeLottery) {
        return DraFreeLotteryResSafeValid.add(req, draFreeLottery) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraFreeLotteryResExecutor.add(req, draFreeLottery);
    }

    public Mono<ServerResponse> delete_$DraFreeLotteryUpdateLock(ServerRequest req, DraFreeLotteryCondition draFreeLotteryCondition) {
        return DraFreeLotteryResSafeValid.delete(req, draFreeLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraFreeLotteryResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$DraFreeLotteryUpdateLock(ServerRequest req, DraFreeLottery draFreeLottery) {
        return DraFreeLotteryResSafeValid.modify(req, draFreeLottery) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraFreeLotteryResExecutor.modify(req, draFreeLottery);
    }

    public Mono<ServerResponse> info_$DraFreeLotteryUpdateLock(ServerRequest req) {
        return DraFreeLotteryResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraFreeLotteryResExecutor.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$DraFreeLotteryUpdateLock(ServerRequest req, DraFreeLotteryCondition draFreeLotteryCondition) {
        return DraFreeLotteryResSafeValid.auditSubmit(req, draFreeLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraFreeLotteryResExecutor.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$DraFreeLotteryUpdateLock(ServerRequest req, DraFreeLotteryCondition draFreeLotteryCondition) {
        return DraFreeLotteryResSafeValid.audit(req, draFreeLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraFreeLotteryResExecutor.audit(req);
    }

    public Mono<ServerResponse> auditReject_$DraFreeLotteryUpdateLock(ServerRequest req, DraFreeLotteryCondition draFreeLotteryCondition) {
        return DraFreeLotteryResSafeValid.auditReject(req, draFreeLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraFreeLotteryResExecutor.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$DraFreeLotteryUpdateLock(ServerRequest req, DraFreeLotteryCondition draFreeLotteryCondition) {
        return DraFreeLotteryResSafeValid.usingEnable(req, draFreeLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraFreeLotteryResExecutor.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$DraFreeLotteryUpdateLock(ServerRequest req, DraFreeLotteryCondition draFreeLotteryCondition) {
        return DraFreeLotteryResSafeValid.usingDisable(req, draFreeLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraFreeLotteryResExecutor.usingDisable(req);
    }
    public Mono<? extends ServerResponse> lottery_$DraFreeLotteryUpdateLock(ServerRequest req, DraFreeLotteryCondition draFreeLotteryCondition) {
        return DraFreeLotteryResSafeValid.lottery(req, draFreeLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraFreeLotteryResExecutor.lottery(req);
    }
}
